package oop.ex4.crosswords;

import java.io.IOException;
import java.util.Set;

/**
 * Represents dictionary which keeps all words together with their definitions.
 * @author Dima
 * 
 */
public interface CrosswordDictionary {
	
	///////////////////////////////////////////////////////
	/////////////////////Public Methods////////////////////
	///////////////////////////////////////////////////////
	
	/**
	 * Retrieves the term definition.
	 * @param term The term.
	 * @return The definition.
	 */
	String getTermDefinition(String term);

	/**
	 * Retrieves a set of terms in dictionary.
	 * @return The set of terms in the dictionary.
	 */
	Set<String> getTerms();

	/**
	 * Loads the dictionary from a file. <br>
	 * The dictionary format is defined in Ex4 pdf.
	 * @param dictFileName The name of dictionary file.
	 * @throws IOException On any I/O error trying to access the file.
	 */
	void load(String dictFileName) throws IOException;
}
